import React from 'react'

type Props = {
    msg:string
}
type list ={
    name:string,
    age:number
}

export default function User({}: Props) {
    const[list,setList]=React.useState<list>([])
    setInterval(()=>{
        const list={
        name:'张三',
        age:10
    }   
    setList(list)
    },1000)


  return (
    <div>User
        名字；{list.name}
        年龄：{list.age}
    </div>
  )
}